package com.company.project.task;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * 定时任务 模块
 */
@Component
@Slf4j
public class TaskTimer {
    //cron 表达式在线生成: https://cron.qqe2.com/
    //每五秒执行一次: 0/5 * * * * ?
    //每五分钟: 0 0/5 * * * ? *
    //五小时:  0 0 0/5 * * ? *
    @Scheduled(cron = "0 0/5 * * * ? ")
    public void testTask() {
        log.error("****  Task 定时任务执行:" + System.currentTimeMillis());
        return;
    }

}
